| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Static Public Member Functions | List of all members
nkAstraeus::nkTasksWrap::ThreadWrapper Class Referencefinal

Wraps a nkAstraeus::lua::nkTasksWrap::LuaThread and offers functions for use in scripting. More...

## Static Public Member Functions
static void | updateEnvironment (nkScripts::Environment *env, LogManager *targetLogManager)
static void * | constructor (LogManager *logManager, const nkScripts::DataStack &stack)
static void | destructor (void *toDestroy)
static nkScripts::OutputValue | addTask (const nkScripts::DataStack &stack)
static nkScripts::OutputValue | releaseTaskRef (const nkScripts::DataStack &stack)
static nkScripts::OutputValue | run (const nkScripts::DataStack &stack)
static nkScripts::OutputValue | askAbort (const nkScripts::DataStack &stack)
static nkScripts::OutputValue | join (const nkScripts::DataStack &stack)
static nkScripts::OutputValue | askAbortAndJoin (const nkScripts::DataStack &stack)
static nkScripts::OutputValue | runScript (const nkScripts::DataStack &stack)

## Detailed Description

Wraps a nkAstraeus::lua::nkTasksWrap::LuaThread and offers functions for use in scripting.

## Member Function Documentation

## ◆ updateEnvironment()

static void nkAstraeus::nkTasksWrap::ThreadWrapper::updateEnvironment | ( | nkScripts::Environment * | env,
|  | LogManager * | targetLogManager
| ) |  |
| static

Updates a given environment and set it up to use all functions wrapped by this wrapper.

Parameters

  env | The environment to set up.
  targetLogManager | The target log manager, should logging happen within the populated methods.

## ◆ constructor()

static void* nkAstraeus::nkTasksWrap::ThreadWrapper::constructor | ( | LogManager * | logManager,
|  | const nkScripts::DataStack & | stack
| ) |  |
| static

Wrapper function for the constructor of the user type.

local t = nkTasks.Thread.new() ;

Parameters

  logManager | The target log manager, should logging happen within the populated methods.
  stack | The parameter stack.

Returns
  An output value with the user type and data allocated.

## ◆ destructor()

static void nkAstraeus::nkTasksWrap::ThreadWrapper::destructor | ( | void * | toDestroy | ) |
| static

Wrapper function for the destructor of the user type.

Parameters

  toDestroy | The data that has to be freed.

## ◆ addTask()

static nkScripts::OutputValue nkAstraeus::nkTasksWrap::ThreadWrapper::addTask | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the nkTasks::Thread::addTask().

local s = t:addTask(d) ;

Parameters

  stack | The parameter stack.

Returns
  The attribute value, as a nkTasks::ThreadSubmittedWork.

## ◆ releaseTaskRef()

static nkScripts::OutputValue nkAstraeus::nkTasksWrap::ThreadWrapper::releaseTaskRef | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the nkAstraeus::lua::LuaThread::releaseTaskRef().

t:releaseTaskRef(d) ;

Parameters

  stack | The parameter stack.

Returns
  The attribute value, empty.

## ◆ run()

static nkScripts::OutputValue nkAstraeus::nkTasksWrap::ThreadWrapper::run | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the nkTasks::Task::run().

t:run() ;

Parameters

  stack | The parameter stack.

Returns
  The attribute value, empty.

## ◆ askAbort()

static nkScripts::OutputValue nkAstraeus::nkTasksWrap::ThreadWrapper::askAbort | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the nkTasks::Task::askAbort().

t:askAbort() ;

Parameters

  stack | The parameter stack.

Returns
  The attribute value, empty.

## ◆ join()

static nkScripts::OutputValue nkAstraeus::nkTasksWrap::ThreadWrapper::join | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the nkTasks::Task::join().

t:join() ;

Parameters

  stack | The parameter stack.

Returns
  The attribute value, empty.

## ◆ askAbortAndJoin()

static nkScripts::OutputValue nkAstraeus::nkTasksWrap::ThreadWrapper::askAbortAndJoin | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the nkTasks::Task::askAbortAndJoin().

t:askAbortAndJoin() ;

Parameters

  stack | The parameter stack.

Returns
  The attribute value, empty.

## ◆ runScript()

static nkScripts::OutputValue nkAstraeus::nkTasksWrap::ThreadWrapper::runScript | ( | const nkScripts::DataStack & | stack | ) |
| static

Wrapper function for the nkAstraeus::lua::LuaThread::runScript().

t:runScript("name") ;

Parameters

  stack | The parameter stack.

Returns
  The attribute value, empty.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsAstraeus/Scripts/nkTasksWrap/Threads/ThreadWrapper.h